<script setup lang="ts">
import { tools } from "@/utils/utils";

// 组件接口
const props = defineProps({
  showData: {
    type: Array as PropType<strPair[]>,
    required: false,
  },
  loading: {
    type: Boolean,
    required: false,
    default: false,
  },
});
</script>

<template>
  <el-container>
    <el-main>
      <el-table
        v-loading="loading"
        element-loading-text="Loading..."
        :element-loading-spinner="tools.svg"
        element-loading-svg-view-box="-10, -10, 50, 50"
        element-loading-background="rgba(122, 122, 122, 0.8)"
        :data="props.showData"
        style="width: 100%; height: 50vh"
      >
        <el-table-column prop="name" label="段名" width="300" />
        <el-table-column prop="data" label="分段结果" width="" />
      </el-table>
    </el-main>
  </el-container>
</template>

<style scoped></style>
